package services

import (
	"gomvc/app/models"

	"github.com/gin-gonic/gin"
	"gorm.io/gorm"
)

var Test = new(testService)

type testService struct {
	db *gorm.DB
}

func (e *testService) AddOne(num int, ctx *gin.Context) {
	e.db = models.Db
	e.db.Model(&models.User{}).Where("id = ?", 1).Update("username", gorm.Expr("username + ?", 1))
}
